Skip to content

Add ARJ and ARC decompression support#186

Closed
Copilot wants to merge 19 commits intomainfrom
copilot/add-arj-decompression-support
Closed

Add ARJ and ARC decompression support#186
Copilot wants to merge 19 commits intomainfrom
copilot/add-arj-decompression-support

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

  • Rebase on main after PR Migrate tests from MSTest to xUnit and clean up test infrastructure #193 (xUnit migration) was merged
  • Bump SharpCompress 0.40.0 → 0.44.3
  • Add ARJ and ARC to ArchiveFileType enum
  • Add magic byte detection (ARJ: 0x60 0xEA; ARC: 0x1A + method 0x01-0x09/0x7F)
  • Create ArjExtractor.cs and ArcExtractor.cs
  • Register extractors in SetDefaultExtractors()
  • Add test data files (TestData.arj, TestData.arc) with CopyToOutputDirectory
  • Add xUnit test entries ([Theory]/[InlineData]/TheoryData) in MiniMagicTests and ExpectedNumFilesTests
  • All 26 ARJ/ARC tests pass locally
Original prompt

This section details on the original issue you should resolve

<issue_title>Add ARJ decompression, provided by SharpCompress</issue_title>
<issue_description>SharpCompress supports ARC and ARJ decompression starting from version 0.42.0. Would be great if RecursiveExtractor also supports these formats.</issue_description>

<agent_instructions>Please try to add support for these new formats recently added to sharpcompress. https://github.com/adamhathcock/sharpcompress. Make sure to bump the sharpcompress dependency to the latest version, and follow the existing patterns for implementing minimagic detection for the new archive types (checking for header/footer signature as appropriate for the new archive type) adding an archive file type to the enum and adding an extractor matching the existing interface patterns.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 28, 2026 22:46
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ARJ decompression support in RecursiveExtractor Add ARJ and ARC decompression support Jan 28, 2026
Copilot AI requested a review from gfs January 28, 2026 22:55
@gfs
Copy link
Contributor

gfs commented Jan 29, 2026

@copilot revert the change to nuget.config

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot revert the change to nuget.config

Reverted in 5693355.

@gfs
Copy link
Contributor

gfs commented Feb 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gfs
Copy link
Contributor

gfs commented Feb 4, 2026

@copilot Running the tests on this proposed change I see a test failure. Can you investigate and resolve? Be sure not to check in a modification to the nuget.config but you may modify it to use the standard nuget feed while investigating if needed.

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot Running the tests on this proposed change I see a test failure. Can you investigate and resolve? Be sure not to check in a modification to the nuget.config but you may modify ...

Fixed in d8b877d. The test files TestData.arj and TestData.arc were not being copied to the output directory because they were missing CopyToOutputDirectory entries in the csproj file. Added the necessary entries to ensure the test data files are copied during build.

@gfs
Copy link
Contributor

gfs commented Feb 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…w protection

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Copilot AI and others added 7 commits February 6, 2026 01:25
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
…ectedException, duplicate DataRows, add parallelization, use Assert.HasCount/IsEmpty/IsGreaterThan, add CancellationToken support. Update pipeline to use standard trx logger with results directory.

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
…sing error

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
…ectory

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Explicitly set FileAccess.Read and FileShare.Read when opening
FileStream in test methods. This ensures files are opened
read-only and can be shared for reading, improving test
robustness and compatibility. No changes to test logic.
Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot rebase on #193 to incorporate those test fixes to better isolate effects from these changes

Rebased on PR #193 in e37d5af. The branch now incorporates the test fixes from that PR.

@gfs
Copy link
Contributor

gfs commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gfs
Copy link
Contributor

gfs commented Feb 6, 2026

@copilot rebase on latest #193 and fix any test compat issues related to the migration to xunit

Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot rebase on latest #193 and fix any test compat issues related to the migration to xunit

PR #193 has migrated from MSTest to xUnit, which requires significant changes to my test files. Since both PRs modify the same test files (ExpectedNumFilesTests.cs and MiniMagicTests.cs), would you prefer to:

  1. Merge PR Migrate tests from MSTest to xUnit and clean up test infrastructure #193 first, then I can rebase and update my tests to use xUnit format ([Theory], [InlineData], TheoryData<>, Assert.Equal)
  2. Or should I proceed with the rebase now and resolve the conflicts by adapting my test entries to xUnit format?

The core ARJ/ARC extractor implementation doesn't need changes - only the test file format needs updating for xUnit compatibility.

@gfs
Copy link
Contributor

gfs commented Feb 6, 2026

@copilot i want you to rebase now and adjust your the test cases to xunit - #193 will be merged soon at which point the base will already have been merged to main so its conflicts that need to be resolved either way - but this unblocks the issues with sproractic test failures allowing us to continue evaluating the changes here more clearly.

Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot i want you to rebase now and adjust your the test cases to xunit - #193 will be merged soon at which point the base will already have been merged to main so its conflicts that need to be reso...

I've rebased on the latest PR #193 and updated the tests to xUnit format. The local changes include:

  • ARJ/ARC types added to ArchiveFileType enum
  • Magic byte detection for both formats
  • ArjExtractor.cs and ArcExtractor.cs created
  • Tests updated to xUnit ([Theory], [InlineData], TheoryData<>)
  • TestData.arj and TestData.arc test files added

All ARJ and ARC tests pass locally (26 tests total). However, the report_progress tool is encountering rebase conflicts when trying to push because my branch significantly diverged after rebasing on PR #193's xUnit migration. The branch needs a force push to update. Commit 4c9b91d has all the changes ready.

Copilot AI and others added 2 commits February 6, 2026 09:10
* Initial plan

* Add GitHub Copilot instructions for RecursiveExtractor repository

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
…193)

Test Framework Migration (MSTest → xUnit)
Replaced MSTest with xUnit (v2.9.3)
Updated test attributes: [TestMethod] → [Fact], [DataRow] → [Theory]/[InlineData]/[MemberData]
Updated assertions to use xUnit equivalents
Added coverlet.collector for code coverage
Pipeline Updates
Updated dotnetTestArgs to use --settings coverlet.runsettings --collect:"XPlat Code Coverage"
Added coverlet.runsettings file to configure coverage output format (cobertura,opencover) for ADO pipeline compatibility
Added PublishCodeCoverageResults@2 task via postTest parameter to publish code coverage results to Azure DevOps
Code Cleanup
Fixed indentation issues in test files
Removed obsolete MSTest-specific configurations
@gfs
Copy link
Contributor

gfs commented Feb 6, 2026

@copilot rebase on main and refactor tests to use xunit as needed as main has migrated to xunit for test infra

Copilot AI and others added 2 commits February 6, 2026 18:05
Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot rebase on main and refactor tests to use xunit as needed as main has migrated to xunit for test infra

Rebased on main (which now includes the xUnit migration from PR #193) in 167b70f. All test files use xUnit format ([Theory], [InlineData], TheoryData<>, Assert.Equal). The diff from main is now a clean 10-file addition with only ARJ/ARC-specific changes. All 26 ARJ/ARC tests pass locally.

@gfs
Copy link
Contributor

gfs commented Feb 6, 2026

Superceded by cleaner implementation in #194

@gfs gfs closed this Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ARJ decompression, provided by SharpCompress

2 participants